{$CLEO .cs}
{$USE ini}
NOP
if
    does_file_exist "cleo\LG Rank.ini"
then
    24@ = read_float_from_ini_file "cleo\LG Rank.ini" "RANK1" "Time"
    if
        24@ > 0.0
    then
    else
        write_float_to_ini_file 0.0 "cleo\LG Rank.ini" "RANK1" "Time"
    end
    24@ = read_float_from_ini_file "cleo\LG Rank.ini" "RANK2" "Time"
    if
        24@ > 0.0
    then
    else
        write_float_to_ini_file 0.0 "cleo\LG Rank.ini" "RANK2" "Time"
    end
    24@ = read_float_from_ini_file "cleo\LG Rank.ini" "RANK3" "Time"
    if
        24@ > 0.0
    then
    else
        write_float_to_ini_file 0.0 "cleo\LG Rank.ini" "RANK3" "Time"
    end
end

:DONTOL
wait 0
if and
    is_player_playing $PLAYER_CHAR
    is_char_on_foot $PLAYER_ACTOR
    can_player_start_mission $PLAYER_CHAR
    $ONMISSION == 0
    test_cheat "GUESSER"
jf @DONTOL
1@ = get_char_area_visible $PLAYER_ACTOR
if
    1@ == 0
jf @DONTOL
if
    $ONMISSION == 1
then
    jump @DONTOL
end
clear_prints
print_big "OWOAJG1" 3000 2
set_player_control $PLAYER_CHAR 0
get_char_model $PLAYER_ACTOR 2@
if
    does_file_exist "cleo\LG Rank.ini"
then
    16@ = read_int_from_ini_file "cleo\LG Rank.ini" "MENULG" "NeedClue"
    29@ = read_int_from_ini_file "cleo\LG Rank.ini" "MENULG" "NeedRank"
else
    16@ = 0
    29@ = 0
end
wait 10
$ONMISSION = 1
$LIATWAKTUANJING = 0
fade 0 1000
wait 1000
gosub @PRABODO
jump @PARIS

:PRABODO
wait 0
request_animation "BOMBER"
request_animation "ON_LOOKERS"
request_model #MALE01
if and
    has_animation_loaded "ON_LOOKERS"
    has_animation_loaded "BOMBER"
    has_model_loaded #MALE01
jf @PRABODO
return

:PARIS //Yes, I've taken this codes from my previous mod "Find Sweet"
wait 0 //Check it if you want, available for PC and Mobile btw
3@ = generate_random_float_in_range -3000.0 3000.0
4@ = generate_random_float_in_range -3000.0 3000.0
get_char_coordinates $PLAYER_ACTOR 5@ 6@ 7@
28@ = get_char_heading $PLAYER_ACTOR
if
    has_char_got_weapon $PLAYER_ACTOR 46
then
    remove_weapon_from_char 46 $PLAYER_ACTOR
end
wait 50
if
    is_char_sitting_in_any_car $PLAYER_ACTOR
then
    1@ = store_car_char_is_in_no_save $PLAYER_ACTOR
else
    1@ = 0
end
if
    not 1@ == 0
then
    warp_char_from_car_to_coord $PLAYER_ACTOR 3@ 4@ 100.0
    freeze_car_position 1@ 1
else
    set_char_coordinates $PLAYER_ACTOR 3@ 4@ 100.0
end
request_collision 3@ 4@
wait 2000
clear_wanted_level $PLAYER_CHAR
if
    is_char_in_zone $PLAYER_ACTOR 'REST'
then
    wait 50
    clear_wanted_level $PLAYER_CHAR
    set_max_wanted_level 0
end
get_char_coordinates $PLAYER_ACTOR 8@ 9@ 10@
get_closest_car_node_with_heading 8@ 9@ 10@ 11@ 12@ 13@ 14@
set_char_coordinates $PLAYER_ACTOR 11@ 12@ 13@
set_char_heading $PLAYER_ACTOR 14@
request_collision 11@ 12@
freeze_char_position $PLAYER_ACTOR 1
wait 2000
set_player_model $PLAYER_CHAR #MALE01
wait 5
freeze_char_position $PLAYER_ACTOR 0
set_player_control $PLAYER_CHAR 1
switch_widescreen 1
restore_camera_jumpcut
fade 1 3000
wait 5
clear_help
print_help 'OWOAJ11'
freeze_char_position $PLAYER_ACTOR 1
task_play_anim $PLAYER_ACTOR "WAVE_LOOP" "ON_LOOKERS" 4.0 1 0 0 0 -1
wait 6000
fade 0 1000
get_name_of_zone 11@ 12@ 13@ s$NAMAZONA
get_char_coordinates $PLAYER_ACTOR 11@ 12@ 13@
wait 1000
freeze_char_position $PLAYER_ACTOR 0
set_player_model $PLAYER_CHAR 2@
wait 50
clear_help
if
    not 1@ == 0
then
    task_warp_char_into_car_as_driver $PLAYER_ACTOR 1@
    freeze_car_position 1@ 0
    mark_car_as_no_longer_needed 1@
else
    set_char_coordinates $PLAYER_ACTOR 5@ 6@ 7@
    set_char_heading $PLAYER_ACTOR 28@
end
request_collision 5@ 6@
mark_model_as_no_longer_needed #MALE01
remove_animation "ON_LOOKERS"
wait 5
clear_char_tasks $PLAYER_ACTOR
restore_camera_jumpcut
gosub @KONTOL
fade 1 1000
wait 1000
switch_widescreen 0
display_onscreen_timer_with_string $LIATWAKTUANJING 0 'BB_19'
freeze_onscreen_timer 0
wait 5
if
    16@ == 1
then
    clear_prints
    print_string_in_string_now 'OWOAJG2' s$NAMAZONA 3000 1
else
end
clear_help
if
    does_file_exist "cleo\LG Rank.ini"
then
    1@ = read_int_from_ini_file "cleo\LG Rank.ini" "MENULG" "NeedTP"
else
    1@ = 0
end
if
    1@ == 1
then
    print_help 'OWOAJG3'
else
    print_help 'OWOAJG4'
end

:TEDDY
wait 0
if or
    is_player_dead $PLAYER_CHAR
    has_char_been_arrested $PLAYER_ACTOR
    test_cheat "GUESSER"
then
    clear_onscreen_timer $LIATWAKTUANJING
    remove_animation "BOMBER"
    $LIATWAKTUANJING = 0
    $ONMISSION = 0
    wait 5
    jump @DONTOL
end
if
    is_key_pressed 88
then
    set_player_control $PLAYER_CHAR 0
    get_char_coordinates $PLAYER_ACTOR 5@ 6@ 7@
    28@ = get_char_heading $PLAYER_ACTOR
    if
        is_char_sitting_in_any_car $PLAYER_ACTOR
    then
        1@ = store_car_char_is_in_no_save $PLAYER_ACTOR
    else
        1@ = 0
    end
    fade 0 500
    wait 500
    jump @MBG
end
if and
    is_key_pressed 84
    get_target_blip_coords 5@ 6@ 7@
then
    if
        does_file_exist "cleo\LG Rank.ini"
    then
        1@ = read_int_from_ini_file "cleo\LG Rank.ini" "MENULG" "NeedTP"
    else
        1@ = 0
    end
    if
        1@ == 1
    then
        get_target_blip_coords 5@ 6@ 7@
        fade 0 500
        wait 500
        set_char_coordinates $PLAYER_ACTOR 5@ 6@ 7@
        freeze_char_position $PLAYER_ACTOR 1
        wait 10
        request_collision 5@ 6@
        get_target_blip_coords 5@ 6@ 7@
        set_char_coordinates $PLAYER_ACTOR 5@ 6@ 7@
        freeze_char_position $PLAYER_ACTOR 0
        fade 1 500
    else
    end
end
if and
    is_char_on_foot $PLAYER_ACTOR
    can_player_start_mission $PLAYER_CHAR
    is_key_pressed 9
jf @TEDDY

:PELER
wait 0
request_model #kmb_goflag
if
    has_model_loaded #kmb_goflag
jf @PELER
freeze_onscreen_timer 1
task_play_anim $PLAYER_ACTOR "BOM_PLANT" "BOMBER" 4.0 0 0 0 0 -1

:PELER2
wait 0
get_char_coordinates $PLAYER_ACTOR 5@ 6@ 7@
if
    not is_char_playing_anim $PLAYER_ACTOR "BOM_PLANT"
then
    remove_animation "BOMBER"
else
    jump @PELER2
end
17@ = create_object #kmb_goflag 5@ 6@ 7@
18@ = create_object #kmb_goflag 11@ 12@ 13@
21@ = add_blip_for_object 17@
22@ = add_blip_for_object 18@
change_blip_colour 21@ 4
change_blip_colour 22@ 4
wait 5
19@ = get_distance_between_coords_2d 5@ 6@ 11@ 12@
cset_lvar_int_to_lvar_float 20@ 19@
wait 10
clear_prints
print_with_number 'OWOAJG5' 20@ 3000 1
gosub @TAHI
wait 3000
clear_help
clear_onscreen_timer $LIATWAKTUANJING
set_max_wanted_level 6
mark_object_as_no_longer_needed 17@
mark_object_as_no_longer_needed 18@
remove_blip 21@
remove_blip 22@
mark_model_as_no_longer_needed #kmb_goflag
fade 0 1000
wait 1000
$LIATWAKTUANJING = 0
gosub @PRABODO
jump @PARIS

:MBG
wait 0
gosub @PRABODO
if
    not 1@ == 0
then
    warp_char_from_car_to_coord $PLAYER_ACTOR 11@ 12@ 13@
    freeze_car_position 1@ 1
else
    set_char_coordinates $PLAYER_ACTOR 11@ 12@ 13@
end
set_char_heading $PLAYER_ACTOR 14@
request_collision 11@ 12@
set_player_model $PLAYER_CHAR #MALE01
wait 500
switch_widescreen 1
restore_camera_jumpcut
gosub @KONTOL
fade 1 500
wait 5
set_player_control $PLAYER_CHAR 1
freeze_char_position $PLAYER_ACTOR 1
task_play_anim $PLAYER_ACTOR "WAVE_LOOP" "ON_LOOKERS" 4.0 1 0 0 0 -1

:RACUN
wait 0
if
    not is_key_pressed 88
jf @RACUN
freeze_char_position $PLAYER_ACTOR 0
fade 0 1000
wait 1000
clear_char_tasks $PLAYER_ACTOR
set_player_model $PLAYER_CHAR 2@
if
    not 1@ == 0
then
    task_warp_char_into_car_as_driver $PLAYER_ACTOR 1@
    freeze_car_position 1@ 0
    mark_car_as_no_longer_needed 1@
else
    set_char_coordinates $PLAYER_ACTOR 5@ 6@ 7@
    set_char_heading $PLAYER_ACTOR 28@
end
request_collision 5@ 6@
wait 50
mark_model_as_no_longer_needed #MALE01
remove_animation "ON_LOOKERS"
wait 5
restore_camera_jumpcut
gosub @KONTOL
switch_widescreen 0
fade 1 500
wait 500
jump @TEDDY

:KONTOL
wait 0
if
    can_player_start_mission $PLAYER_CHAR
jf @KONTOL
return

:TAHI //minute
wait 0
if or
    not does_file_exist "cleo\LG Rank.ini"
    29@ == 0
then
    return
end
clear_help
print_help_forever 'OWOAJG6'
set_lvar_float 23@ 0.00
set_lvar_int_to_var_int 24@ $LIATWAKTUANJING

:TAHI1
wait 5
if
    24@ == 60000
then
    sub_val_from_int_lvar 24@ 60000
    23@ += 1.0
    jump @TAHI1
end
if
    60000 > 24@
then
else
    sub_val_from_int_lvar 24@ 60000
    23@ += 1.0
    jump @TAHI1
end

:PEJU //second
wait 5
if
    24@ == 1000
then
    sub_val_from_int_lvar 24@ 1000
    23@ += 0.01
    jump @PEJU
end
if
    1000 > 24@
then
else
    sub_val_from_int_lvar 24@ 1000
    23@ += 0.01
    jump @PEJU
end

:AMBA1
wait 5
24@ = read_float_from_ini_file "cleo\LG Rank.ini" "RANK1"  "Time"
if
    24@ == 0.0
then
    write_float_to_ini_file 23@ "cleo\LG Rank.ini" "RANK1" "Time"
    write_int_to_ini_file 20@ "cleo\LG Rank.ini" "RANK1" "Distance"
    wait 5
    get_name_of_zone 5@ 6@ 7@ s$NAMAZONA
    write_string_to_ini_file s$NAMAZONA "cleo\LG Rank.ini" "RANK1" "GuessLocation"
    wait 5
    clear_help
    print_help 'OWOAJG7'
    get_name_of_zone 11@ 12@ 13@ s$NAMAZONA
    write_string_to_ini_file s$NAMAZONA "cleo\LG Rank.ini" "RANK1" "TargetLocation"
    return
else
end
25@ = read_float_from_ini_file "cleo\LG Rank.ini" "RANK1" "Distance"
cset_lvar_float_to_lvar_int 26@ 20@
add_float_lvar_to_float_lvar 24@ 25@
if
    24@ == 0.0
then
    write_float_to_ini_file 23@ "cleo\LG Rank.ini" "RANK1" "Time"
    write_int_to_ini_file 20@ "cleo\LG Rank.ini" "RANK1" "Distance"
    wait 5
    get_name_of_zone 5@ 6@ 7@ s$NAMAZONA
    write_string_to_ini_file s$NAMAZONA "cleo\LG Rank.ini" "RANK1" "GuessLocation"
    wait 5
    clear_help
    print_help 'OWOAJG7'
    get_name_of_zone 11@ 12@ 13@ s$NAMAZONA
    write_string_to_ini_file s$NAMAZONA "cleo\LG Rank.ini" "RANK1" "TargetLocation"
    return
else
end
add_float_lvar_to_float_lvar 23@ 26@
if
    is_float_lvar_greater_than_float_lvar 24@ 23@
then
    sub_float_lvar_from_float_lvar 23@ 26@
    24@ = read_float_from_ini_file "cleo\LG Rank.ini" "RANK2" "Time"
    27@ = read_int_from_ini_file "cleo\LG Rank.ini" "RANK2" "Distance"
    wait 5
    write_float_to_ini_file 24@ "cleo\LG Rank.ini" "RANK3" "Time"
    write_int_to_ini_file 27@ "cleo\LG Rank.ini" "RANK3" "Distance"
    24@v = read_string_from_ini_file "cleo\LG Rank.ini" "RANK2" "GuessLocation"
    27@v = read_string_from_ini_file "cleo\LG Rank.ini" "RANK2" "TargetLocation"
    wait 5
    write_string_to_ini_file 24@v "cleo\LG Rank.ini" "RANK3" "GuessLocation"
    write_string_to_ini_file 27@v "cleo\LG Rank.ini" "RANK3" "TargetLocation"
    wait 5
    24@ = read_float_from_ini_file "cleo\LG Rank.ini" "RANK1" "Time"
    27@ = read_int_from_ini_file "cleo\LG Rank.ini" "RANK1" "Distance"
    wait 5
    write_float_to_ini_file 24@ "cleo\LG Rank.ini" "RANK2" "Time"
    write_int_to_ini_file 27@ "cleo\LG Rank.ini" "RANK2" "Distance"
    24@v = read_string_from_ini_file "cleo\LG Rank.ini" "RANK1" "GuessLocation"
    27@v = read_string_from_ini_file "cleo\LG Rank.ini" "RANK1" "TargetLocation"
    wait 5
    write_string_to_ini_file 24@v "cleo\LG Rank.ini" "RANK2" "GuessLocation"
    write_string_to_ini_file 27@v "cleo\LG Rank.ini" "RANK2" "TargetLocation"
    wait 5
    write_float_to_ini_file 23@ "cleo\LG Rank.ini" "RANK1" "Time"
    write_int_to_ini_file 20@ "cleo\LG Rank.ini" "RANK1" "Distance"
    wait 5
    get_name_of_zone 5@ 6@ 7@ s$NAMAZONA
    write_string_to_ini_file s$NAMAZONA "cleo\LG Rank.ini" "RANK1" "GuessLocation"
    wait 5
    clear_help
    print_help 'OWOAJG7'
    get_name_of_zone 11@ 12@ 13@ s$NAMAZONA
    write_string_to_ini_file s$NAMAZONA "cleo\LG Rank.ini" "RANK1" "TargetLocation"
    return
else
end

:AMBA2
wait 5
24@ = read_float_from_ini_file "cleo\LG Rank.ini" "RANK2" "Time"
if
    24@ == 0.0
then
    sub_float_lvar_from_float_lvar 23@ 26@
    write_float_to_ini_file 23@ "cleo\LG Rank.ini" "RANK2" "Time"
    write_int_to_ini_file 20@ "cleo\LG Rank.ini" "RANK2" "Distance"
    wait 5
    get_name_of_zone 5@ 6@ 7@ s$NAMAZONA
    write_string_to_ini_file s$NAMAZONA "cleo\LG Rank.ini" "RANK2" "GuessLocation"
    wait 5
    clear_help
    print_help 'OWOAJG8'
    get_name_of_zone 11@ 12@ 13@ s$NAMAZONA
    write_string_to_ini_file s$NAMAZONA "cleo\LG Rank.ini" "RANK2" "TargetLocation"
    return
else
end
25@ = read_float_from_ini_file "cleo\LG Rank.ini" "RANK2" "Distance"
add_float_lvar_to_float_lvar 24@ 25@
if
    24@ == 0.0
then
    sub_float_lvar_from_float_lvar 23@ 26@
    write_float_to_ini_file 23@ "cleo\LG Rank.ini" "RANK2" "Time"
    write_int_to_ini_file 20@ "cleo\LG Rank.ini" "RANK2" "Distance"
    wait 5
    get_name_of_zone 5@ 6@ 7@ s$NAMAZONA
    write_string_to_ini_file s$NAMAZONA "cleo\LG Rank.ini" "RANK2" "GuessLocation"
    wait 5
    clear_help
    print_help 'OWOAJG8'
    get_name_of_zone 11@ 12@ 13@ s$NAMAZONA
    write_string_to_ini_file s$NAMAZONA "cleo\LG Rank.ini" "RANK2" "TargetLocation"
    return
else
end
if
    is_float_lvar_greater_than_float_lvar 24@ 23@
then
    sub_float_lvar_from_float_lvar 23@ 26@
    24@ = read_float_from_ini_file "cleo\LG Rank.ini" "RANK2" "Time"
    27@ = read_int_from_ini_file "cleo\LG Rank.ini" "RANK2" "Distance"
    wait 5
    write_float_to_ini_file 24@ "cleo\LG Rank.ini" "RANK3" "Time"
    write_int_to_ini_file 27@ "cleo\LG Rank.ini" "RANK3" "Distance"
    24@v = read_string_from_ini_file "cleo\LG Rank.ini" "RANK2" "GuessLocation"
    27@v = read_string_from_ini_file "cleo\LG Rank.ini" "RANK2" "TargetLocation"
    wait 5
    write_string_to_ini_file 24@v "cleo\LG Rank.ini" "RANK3" "GuessLocation"
    write_string_to_ini_file 27@v "cleo\LG Rank.ini" "RANK3" "TargetLocation"
    wait 5
    write_float_to_ini_file 23@ "cleo\LG Rank.ini" "RANK2" "Time"
    write_int_to_ini_file 20@ "cleo\LG Rank.ini" "RANK2" "Distance"
    wait 5
    get_name_of_zone 5@ 6@ 7@ s$NAMAZONA
    write_string_to_ini_file s$NAMAZONA "cleo\LG Rank.ini" "RANK2" "GuessLocation"
    wait 5
    clear_help
    print_help 'OWOAJG8'
    get_name_of_zone 11@ 12@ 13@ s$NAMAZONA
    write_string_to_ini_file s$NAMAZONA "cleo\LG Rank.ini" "RANK2" "TargetLocation"
    return
else
end

:AMBA3
wait 5
24@ = read_float_from_ini_file "cleo\LG Rank.ini" "RANK3" "Time"
if
    24@ == 0.0
then
    sub_float_lvar_from_float_lvar 23@ 26@
    write_float_to_ini_file 23@ "cleo\LG Rank.ini" "RANK3" "Time"
    write_int_to_ini_file 20@ "cleo\LG Rank.ini" "RANK3" "Distance"
    wait 5
    get_name_of_zone 5@ 6@ 7@ s$NAMAZONA
    write_string_to_ini_file s$NAMAZONA "cleo\LG Rank.ini" "RANK3" "GuessLocation"
    wait 5
    clear_help
    print_help 'OWOAJG8'
    get_name_of_zone 11@ 12@ 13@ s$NAMAZONA
    write_string_to_ini_file s$NAMAZONA "cleo\LG Rank.ini" "RANK3" "TargetLocation"
    return
else
end
25@ = read_float_from_ini_file "cleo\LG Rank.ini" "RANK3" "Distance"
add_float_lvar_to_float_lvar 24@ 25@
if
    24@ == 0.0
then
    sub_float_lvar_from_float_lvar 23@ 26@
    write_float_to_ini_file 23@ "cleo\LG Rank.ini" "RANK3" "Time"
    write_int_to_ini_file 20@ "cleo\LG Rank.ini" "RANK3" "Distance"
    wait 5
    get_name_of_zone 5@ 6@ 7@ s$NAMAZONA
    write_string_to_ini_file s$NAMAZONA "cleo\LG Rank.ini" "RANK3" "GuessLocation"
    wait 5
    clear_help
    print_help 'OWOAJG9'
    get_name_of_zone 11@ 12@ 13@ s$NAMAZONA
    write_string_to_ini_file s$NAMAZONA "cleo\LG Rank.ini" "RANK3" "TargetLocation"
    return
else
end
if
    is_float_lvar_greater_than_float_lvar 24@ 23@
then
    sub_float_lvar_from_float_lvar 23@ 26@
    write_float_to_ini_file 23@ "cleo\LG Rank.ini" "RANK3" "Time"
    write_int_to_ini_file 20@ "cleo\LG Rank.ini" "RANK3" "Distance"
    wait 5
    get_name_of_zone 5@ 6@ 7@ s$NAMAZONA
    write_string_to_ini_file s$NAMAZONA "cleo\LG Rank.ini" "RANK3" "GuessLocation"
    wait 5
    clear_help
    print_help 'OWOAJG9'
    get_name_of_zone 11@ 12@ 13@ s$NAMAZONA
    write_string_to_ini_file s$NAMAZONA "cleo\LG Rank.ini" "RANK3" "TargetLocation"
    return
else
end
clear_help
print_help 'OWOAJ10'
return